<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
     for(;;){
      let years = Number(prompt('输入年份'))
      let month = Number(prompt('输入月份'))
      if (years ===114514) break
      if (month === 2 && years % 400 === 0 || (years % 4 === 0 && years % 100 !== 0)) {
        alert('这个月有29天')
      } else if (month === 2){
        alert('这个月有28天')
      }else if(month === 4){
        alert('这个月有30天')
      }else if(month === 6){
        alert('这个月有30天')
      }else if(month === 9){
        alert('这个月有30天')
      }else if(month === 11){
        alert('这个月有30天')
      }else if(month > 12){
        alert('输入的正确的月份')
      }else {
        alert('这个月有31天')
      }
     }

      
    
    </script>
  </body>
</html>
